// component/find/find.js
let app = getApp();
var applet_park_api_url = app.globalData.applet_park_api_url;
var applet_park_api_url_imgUrl = app.globalData.applet_park_api_url_imgUrl;
const {
  requestDataparams
} = require('../../utils/request.js');
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },
/* 组件声明周期函数 */
lifetimes: {
  attached: function () {
    this.getLists()
  },
  moved: function () { 

  },
  detached: function () { 

  },
},

  /**
   * 组件的初始数据
   */
  data: {
    imgUrl:applet_park_api_url_imgUrl,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getLists(){
      var that =this;
        requestDataparams('/api/information/queryIssueInformationList',{ type:1 }, 'POST','json').then(response=>{
                    if(response.data.code == 0){
                      for(var i=0;i<response.data.data.records.length;i++){
                        response.data.data.records[i].createTime =  response.data.data.records[i].createTime.substring(0,10);
                      }
                      that.setData({
                        dynamiclist:response.data.data.records
                      })
                    }else{
                      wx.showToast({
                        title: '失败',
                        icon:'none'
                      })
                    }
            })
    },
    enterPolicydatail(e){
      var id = e.currentTarget.dataset.id;
      wx.navigateTo({
        url: '../../packageC/pages/parkDynamicsDetails/parkDynamicsDetails?id='+id,
          //  url: '../../'
      })
    },
  }
})
